package com.centaur0.io;

import java.io.IOException;
import java.io.Writer;

import javax.servlet.ServletOutputStream;

public class WriterImpl extends Writer{
	ServletOutputStream out;
	public WriterImpl(ServletOutputStream out) {
		this.out = out;
	}

	@Override
	public void write(char[] cbuf, int off, int len) throws IOException {
		this.out.print(new String(cbuf, off, len));
	}

	@Override
	public void flush() throws IOException {
		out.flush();
	}

	@Override
	public void close() throws IOException {
		out.close();
	}		
}